const Layout = () => import(/* webpackChunkName: 'index' */ '../page/layout')

const staticRoute = [
    {
        path: '/',
        redirect: '/login'
    },
    {
        path: '/error',
        component: () => import(/* webpackChunkName: 'error' */ '../page/error'),
        children: [
            {
                path: '401',
                component: () => import(/* webpackChunkName: 'error' */ '../page/error/401')
            },
            {
                path: '403',
                component: () => import(/* webpackChunkName: 'error' */ '../page/error/403')
            },
            {
                path: '404',
                component: () => import(/* webpackChunkName: 'error' */ '../page/error/404')
            },
            {
                path: '500',
                component: () => import(/* webpackChunkName: 'error' */ '../page/error/500')
            }
        ]
    },
    {
        path: '/login',
        component: () => import(/* webpackChunkName: 'login' */ '../page/login')
    },
    {
        path: '/home', //首页
        component: Layout,
        children: [
            {
                path: '',
                component: () => import(/* webpackChunkName: 'home' */ '../page/home'),
            }
        ]
    },
    {
        path: '/aa', //权限
        component: Layout,
        children: [
            {
                path: 'role',
                component: () => import('../page/aa/role'),
            },
            {
                path: 'role2res',
                component: () => import('../page/aa/role2res'),
            },
            {
                path: 'user2res',
                component: () => import('../page/aa/user2res'),
            }
        ]
    },
    {
        path: '/basic', //基础设置
        component: Layout,
        children: [
            {
                path: 'dict',
                component: () => import('../page/basic/dict'),
            }
        ]
    },
    {
        path: '/hr', //人事管理
        component: Layout,
        children: [
            {
                path: 'dept',
                component: () => import('../page/hr/dept'),
            },
            {
                path: 'emp',
                component: () => import('../page/hr/emp'),
            }
        ]
    },
    {
        path: '/sell', //销售管理
        component: Layout,
        children: [
            {
                path: 'quot',
                component: () => import('../page/sell/quot/quot'),
            },
            {
                path: 'order',
                component: () => import('../page/sell/order/order'),
            },
            {
                path: 'target',
                component: () => import('../page/sell/conf/target'),
            },
            {
                path: 'ratio',
                component: () => import('../page/sell/conf/ratio'),
            },
            {
                path: 'customer',
                component: () => import('../page/company/customer'),
            }
        ]
    },
    {
        path: '/finance', //财务管理
        component: Layout,
        children: [
            {
                path: 'payment',
                component: () => import('../page/finance/payment/payment'), //收款录入
            },
            {
                path: 'receipt',
                component: () => import('../page/finance/receipt/receipt'), //发票录入
            }
        ]
    },
    {
        path: '/produce', // 生产管理
        component: Layout,
        children: [{
                path: 'plan',
                component: () => import('../page/produce/plan'),
            }
        ]
    },
    {
        path: '/purchase', // 采购管理
        component: Layout,
        children: [{
                path: 'supply',
                component: () => import('../page/company/supply'),
            }
        ]
    },
    {
        path: '/components',
        component: Layout,
        children: [
            {
                path: '',
                component: () => import(/* webpackChunkName: 'components' */ '../page/components')
            },
            {
                path: 'pageNotes',
                component: () => import(/* webpackChunkName: 'components' */ '../page/components/assist/pageNotes')
            },
            {
                path: 'permission',
                component: () => import(/* webpackChunkName: 'components' */ '../page/components/function/permission')
            },
            {
                path: 'pageTable',
                component: () => import(/* webpackChunkName: 'components' */ '../page/components/function/pageTable')
            },
            {
                path: 'pageSearch',
                component: () => import(/* webpackChunkName: 'components' */ '../page/components/ui/pageSearch')
            },
            {
                path: 'pageSection',
                component: () => import(/* webpackChunkName: 'components' */ '../page/components/ui/pageSection')
            },
            {
                path: 'pageTitle',
                component: () => import(/* webpackChunkName: 'components' */ '../page/components/ui/pageTitle')
            },
            {
                path: 'pageToolbar',
                component: () => import(/* webpackChunkName: 'components' */ '../page/components/ui/pageToolbar')
            }
        ]
    },
    {
        path: '/example',
        component: Layout,
        children: [
            {
                path: 'table',
                component: () => import(/* webpackChunkName: 'example' */ '../page/example/table')
            },
            {
                path: 'charts',
                component: () => import(/* webpackChunkName: 'example' */ '../page/example/charts')
            },
            {
                path: 'map',
                component: () => import(/* webpackChunkName: 'example' */ '../page/example/map')
            }
        ]
    },
    {
        path: '/i18n',
        component: Layout,
        children: [
            {
                path: '',
                component: () => import(/* webpackChunkName: 'i18n' */ '../page/i18n')
            }
        ]
    },
    {
        path: '/theme',
        component: Layout,
        children: [
            {
                path: '',
                component: () => import(/* webpackChunkName: 'themeChange' */ '../page/themeChange')
            }
        ]
    },
    {
        path: '*',
        redirect: '/error/404'
    }
]

export default staticRoute
